<template>
  <div class="app-container">
    <el-form :model="searchForm" :inline="true">
      <el-row>
        <el-col :span="17">
          <el-form-item prop="fuzzy">
            <el-input
              v-model="searchForm.fuzzy"
              style="width: 250px"
              placeholder="样品编号/检测位置"
            />
          </el-form-item>
          <el-form-item>
            <template>
              <el-button
                type="primary"
                class="iconfont icon-chaxun1"
                size="small"
                @click="handleSearch"
              >
                查询</el-button
              >
            </template>
          </el-form-item>
        </el-col>
        <el-col :span="6" class="search-right">
          <el-button type="text" icon="el-icon-refresh" @click="handleSearch"
            >刷新</el-button
          >
        </el-col>
      </el-row>
    </el-form>

    <div>
      <el-table
        ref="stockTable"
        stripe
        border
        :data="factorData"
        class="table-item"
        highlight-current-row
        :header-cell-style="{ background: '#ECF3FC' }"
        style="width: 100%"
      >
        <template slot="empty">
          <div class="table_empty">
            <div class="empty_tips">
              <span> 暂无数据 </span>
            </div>
          </div>
        </template>
        <el-table-column type="index" width="50" align="center" label="序号" />
        <el-table-column
          prop="sampleNo"
          label="样品编号"
          width="180"
          align="center"
        />
        <el-table-column
          prop="orginNo"
          label="原样品编号"
          width="180"
          align="center"
        />
        <el-table-column
          prop="sampleType"
          label="样品类别"
          width="180"
          align="center"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.sampleType == '0'">标准样品</span>
            <span v-if="scope.row.sampleType == '1'">平行样</span>
            <span v-if="scope.row.sampleType == '2'">全程序空白样</span>
            <span v-if="scope.row.sampleType == '3'">输空白样</span>
            <span v-if="scope.row.sampleType == '4'">子样品</span>
            <span v-if="scope.row.sampleType == '5'">密码样</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="factorPoint"
          label="检测位置"
          width="130px"
          align="center"
        />
        <el-table-column
          prop="secdClassName"
          label="检测类别"
          width="180"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="factorName"
          label="检测因子"
          width="100"
          align="center"
        />
        <el-table-column
          prop="collectTime"
          label="采样时间"
          width="150"
          align="center"
        />
        <el-table-column
          prop="collectUser"
          label="采样人"
          width="100"
          align="center"
        />
        <el-table-column
          prop="confirmTime"
          label="采样确认时间"
          width="180"
          align="center"
        />
        <el-table-column
          prop="confirmUser"
          label="采样组长"
          width="100"
          align="center"
        />
        <el-table-column
          prop="checkTime"
          label="采样审核时间"
          width="180"
          align="center"
        />
        <el-table-column
          prop="checkUser"
          label="采样部门负责人"
          width="120"
          align="center"
        />
        <el-table-column
          prop="storeTime"
          label="入库时间"
          width="100"
          align="center"
        />

        <el-table-column fixed="right" align="center" label="操作" width="100">
          <template slot-scope="scope">
            <el-button type="text" @click="handleDetail(scope.row)"
              >修订</el-button
            >
          </template>
        </el-table-column>
      </el-table>
    </div>
    <div style="">
      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="searchForm.pageNumber"
        :limit.sync="searchForm.pageSize"
        @pagination="handleSearch"
      />
    </div>

    <!-- 修订弹框 -->
    <el-dialog
      :title="currentSample + '-修订信息'"
      :visible.sync="sampleVisible"
      width="85%"
      center
      top="5vh"
    >
      <el-form
        :model="sampleDetailForm"
        :rules="rules"
        label-width="180px"
        label-position="right"
      >
        <el-card style="margin-top: 5px; padding-bottom: 20px">
          <div slot="header" class="clearfix">
            <div
              style="
                width: 3px;
                margin: auto 3px;
                height: 20px;
                background-color: steelblue;
              "
            />
            <span>基础信息</span>
          </div>
          <el-col :span="16" style="height: 32px">
            <el-form-item label-width="100" label="检测因子:">
              <span class="showTile">{{ sampleDetailForm.factorName }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="8" style="height: 32px">
            <el-form-item label-width="100" label="点位:">
              <span class="showTile">{{ sampleDetailForm.factorPoint }}</span>
            </el-form-item>
          </el-col>
        </el-card>

        <!--动态二级类别信息-->
        <el-card
          v-for="item in sampleSecInfo"
          :key="item.groupKey"
          style="margin-top: 5px; padding-bottom: 20px"
        >
          <div
            v-if="item.groupName && item.groupName != ''"
            slot="header"
            class="clearfix"
          >
            <div
              style="
                width: 3px;
                margin: auto 3px;
                height: 20px;
                background-color: steelblue;
              "
            />
            <span>{{ item.groupName }}</span>
          </div>
          <el-col
            v-for="(sitem, index) in item.params"
            :key="index"
            :span="8"
            :style="{
              height:
                sitem.name === '采样设备' ||
                sitem.name === '中流量校准仪器' ||
                sitem.name === '小流量校准仪器' ||
                sitem.name === '烟尘(气)检测仪器及编号' ||
                sitem.name === '现场检测设备' ||
                sitem.name === '校准设备'
                  ? '51px'
                  : '50px'
            }"
          >
            <el-form-item :label="sitem.name + ':'">
              <!-- ******************************************************************************  -->
              <!-- ******************************************************************************  -->
              <!-- 采样设备 -->
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '采样设备'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="onelevel"
                  @change="selectChange"
                >
                  <el-option
                    v-for="item in sitem.selectValue"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '采样设备'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="twolevel"
                  @change="selectChange2"
                >
                  <el-option
                    v-for="item in deviceArray"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '采样设备'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  v-model="threelevel"
                  @change="selectChange3(item, sitem, index)"
                >
                  <el-option
                    v-for="item in device2Array"
                    :key="item.equipmentNumber"
                    :label="item.equipmentNumber"
                    :value="item.equipmentNumber"
                  />
                </el-select>
              </el-col>
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '采样设备' &&
                    threelevel === ''
                "
                v-model="sitem.value"
                :readonly="true"
              />
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '采样设备' &&
                    threelevel !== ''
                "
                v-model="oneORtwoORthree"
                :readonly="true"
              />

              <!-- 现场检测设备 -->
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '现场检测设备'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="onelevel2"
                  @change="selectChangeTwo"
                >
                  <el-option
                    v-for="item in sitem.selectValue"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '现场检测设备'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="twolevel2"
                  @change="selectChange2Two"
                >
                  <el-option
                    v-for="item in deviceArray2"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '现场检测设备'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  v-model="threelevel2"
                  @change="selectChange3Two(item, sitem, index)"
                >
                  <el-option
                    v-for="item in device2Array2"
                    :key="item.equipmentNumber"
                    :label="item.equipmentNumber"
                    :value="item.equipmentNumber"
                  />
                </el-select>
              </el-col>
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '现场检测设备' &&
                    threelevel2 === ''
                "
                v-model="sitem.value"
                :readonly="true"
              />
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '现场检测设备' &&
                    threelevel2 !== ''
                "
                v-model="oneORtwoORthree2"
                :readonly="true"
              />

              <!-- 校准设备 -->
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '校准设备'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="onelevel3"
                  @change="selectChangeTwo3"
                >
                  <el-option
                    v-for="item in sitem.selectValue"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '校准设备'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="twolevel3"
                  @change="selectChange2Two3"
                >
                  <el-option
                    v-for="item in deviceArray3"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '校准设备'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  v-model="threelevel3"
                  @change="selectChange3Two3(item, sitem, index)"
                >
                  <el-option
                    v-for="item in device2Array3"
                    :key="item.equipmentNumber"
                    :label="item.equipmentNumber"
                    :value="item.equipmentNumber"
                  />
                </el-select>
              </el-col>
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '校准设备' &&
                    threelevel3 === ''
                "
                v-model="sitem.value"
                :readonly="true"
              />
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '校准设备' &&
                    threelevel3 !== ''
                "
                v-model="oneORtwoORthree3"
                :readonly="true"
              />

              <!-- 中流量校准仪器 -->
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '中流量校准仪器'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="onelevel4"
                  @change="selectChangeTwo4"
                >
                  <el-option
                    v-for="item in sitem.selectValue"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '中流量校准仪器'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="twolevel4"
                  @change="selectChange2Two4"
                >
                  <el-option
                    v-for="item in deviceArray4"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '中流量校准仪器'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  v-model="threelevel4"
                  @change="selectChange3Two4(item, sitem, index)"
                >
                  <el-option
                    v-for="item in device2Array4"
                    :key="item.equipmentNumber"
                    :label="item.equipmentNumber"
                    :value="item.equipmentNumber"
                  />
                </el-select>
              </el-col>
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '中流量校准仪器' &&
                    threelevel4 === ''
                "
                v-model="sitem.value"
                :readonly="true"
              />
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '中流量校准仪器' &&
                    threelevel4 !== ''
                "
                v-model="oneORtwoORthree4"
                :readonly="true"
              />

              <!-- 小流量校准仪器 -->
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '小流量校准仪器'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="onelevel5"
                  @change="selectChangeTwo5"
                >
                  <el-option
                    v-for="item in sitem.selectValue"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '小流量校准仪器'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="twolevel5"
                  @change="selectChange2Two5"
                >
                  <el-option
                    v-for="item in deviceArray5"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="sitem.labelType == 0 && sitem.name === '小流量校准仪器'"
                  :style="'width:100%;'"
                  placeholder="请选择"
                  v-model="threelevel5"
                  @change="selectChange3Two5(item, sitem, index)"
                >
                  <el-option
                    v-for="item in device2Array5"
                    :key="item.equipmentNumber"
                    :label="item.equipmentNumber"
                    :value="item.equipmentNumber"
                  />
                </el-select>
              </el-col>
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '小流量校准仪器' &&
                    threelevel5 === ''
                "
                v-model="sitem.value"
                :readonly="true"
              />
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '小流量校准仪器' &&
                    threelevel5 !== ''
                "
                v-model="oneORtwoORthree5"
                :readonly="true"
              />

              <!-- 烟尘(气)检测仪器及编号 -->
              <el-col :span="8">
                <el-select
                  v-if="
                    sitem.labelType == 0 &&
                      sitem.name === '烟尘(气)检测仪器及编号'
                  "
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="onelevel6"
                  @change="selectChangeTwo6"
                >
                  <el-option
                    v-for="item in sitem.selectValue"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="
                    sitem.labelType == 0 &&
                      sitem.name === '烟尘(气)检测仪器及编号'
                  "
                  :style="'width:100%;'"
                  placeholder="请选择"
                  value-key="name"
                  v-model="twolevel6"
                  @change="selectChange2Two6"
                >
                  <el-option
                    v-for="item in deviceArray6"
                    :key="item.name"
                    :label="item.name"
                    :value="item"
                  />
                </el-select>
              </el-col>
              <el-col :span="8">
                <el-select
                  v-if="
                    sitem.labelType == 0 &&
                      sitem.name === '烟尘(气)检测仪器及编号'
                  "
                  :style="'width:100%;'"
                  placeholder="请选择"
                  v-model="threelevel6"
                  @change="selectChange3Two6(item, sitem, index)"
                >
                  <el-option
                    v-for="item in device2Array6"
                    :key="item.equipmentNumber"
                    :label="item.equipmentNumber"
                    :value="item.equipmentNumber"
                  />
                </el-select>
              </el-col>
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '烟尘(气)检测仪器及编号' &&
                    threelevel6 === ''
                "
                v-model="sitem.value"
                :readonly="true"
              />
              <el-input
                v-if="
                  sitem.labelType == 0 &&
                    sitem.name === '烟尘(气)检测仪器及编号' &&
                    threelevel6 !== ''
                "
                v-model="oneORtwoORthree6"
                :readonly="true"
              />

              <!-- 判断sitem.labelType == 1 时 使用 -->
              <el-input
                v-if="sitem.labelType == 1"
                v-model="sitem.value"
                style="width: 100%"
                @change="changeMney(item, sitem, index)"
              />

              <!-- 判断sitem.labelType == 2 时 使用 -->
              <el-select
                v-if="sitem.labelType == 2"
                v-model="sitem.value"
                style="width: 100%"
                clearable
                @change="changeMney(item, sitem, index)"
              >
                <el-option
                  v-for="item in sitem.radioValue"
                  :key="item.id"
                  :label="item"
                  :value="item"
                ></el-option>
              </el-select>

              <!-- 判断sitem.labelType == 4 时 使用 -->
              <el-date-picker
                v-if="sitem.labelType == 4"
                v-model="sitem.value"
                style="width: 100%"
                value-format="yyyy-MM-dd"
                type="date"
                @change="changeMney(item, sitem, index)"
              />

              <!-- 判断sitem.labelType == 5 时 使用 -->
              <el-time-picker
                v-if="sitem.labelType == 5"
                v-model="sitem.value"
                @change="changeMney(item, sitem, index)"
                value-format="HH:mm:ss"
                style="width: 100%"
              />

              <!-- 判断sitem.labelType == 6 时 使用 -->
              <el-time-picker
                v-if="sitem.labelType == 6"
                is-range
                v-model="sitem.value"
                @change="changeMney(item, sitem, index)"
                range-separator="至"
                start-placeholder="开始时间"
                end-placeholder="结束时间"
                value-format="HH:mm:ss"
              >
              </el-time-picker>

              <!-- 判断sitem.labelType == 7 时 使用 -->
              <el-select
                v-if="sitem.labelType == 7"
                v-model="sitem.value"
                style="width: 100%"
                clearable
                @change="changeMney(item, sitem, index)"
              >
                <el-option
                  v-for="item in sitem.selectValue"
                  :key="item.id"
                  :label="item"
                  :value="item"
                ></el-option>
              </el-select>

            </el-form-item>
          </el-col>
        </el-card>

        <el-card shadow="never" style="margin-top: 5px">
          <div slot="header" class="clearfix">
            <div
              style="
                width: 3px;
                margin: auto 3px;
                height: 20px;
                background-color: steelblue;
              "
            />
            <span>现场信息</span>
          </div>

          <el-row>
            <el-col :span="18">
              <el-form-item prop="name" label="采样地址:">
                {{ collectLocation }}
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="现场照片:" prop="files">
                <el-upload
                  action="/api/modify/cyFileUpload"
                  list-type="picture-card"
                  :on-preview="handlePictureCardPreview"
                  :on-success="imgSuccess"
                  :on-error="imgError"
                  :limit="4"
                  :on-exceed="handleExceed"
                  :on-change="handleChangeUpload"
                  :before-remove="beforeRemoves"
                  name="files"
                  :file-list="fileLists"
                >
                  <el-button size="small" type="picture-card"
                    >点击上传</el-button
                  >
                  <!-- <p
                slot="tip"
                class="el-upload__tip"
                style="color: red;margin: -35px 0px -5px 94px;"
              >
                注：(您最多只能上传3张图片，且不超过2M)
              </p> -->
                </el-upload>
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>

        <!-- 样品制备信息 -->
        <el-card shadow="never" style="margin-top: 5px" v-if="arrManufacturer">
          <div slot="header" class="clearfix">
            <div
              style="
                width: 3px;
                margin: auto 3px;
                height: 20px;
                background-color: steelblue;
              "
            />
            <span>样品制备信息</span>
          </div>

          <el-row>
            <div class="install-title">土壤/固废样品制备原始记录表</div>
            <el-col :span="6">
              <el-form-item
                prop="manufacturer"
                label="样品编号:"
                label-width="100px"
              >
                <el-input
                  style="width: 100%;"
                  :disabled="true"
                  v-model="sampleNo"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item
                prop="laboratoryNo"
                label="实验室编号:"
                label-width="100px"
              >
                <el-input
                  style="width: 100%;"
                  v-model="laboratoryNo"
                  @focus="usernamedataA1()"
                  @blur="changedataA1()"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="待碎样重量(g):" label-width="110px">
                <el-input-number
                  v-model="fractureWeight"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata1()"
                  @blur="changedata1()"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="缩分K值:" label-width="100px">
                <el-input-number
                  v-model="divisionKvalue"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata2()"
                  @blur="changedata2()"
                />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <div class="install-title">粗碎</div>
            <el-col :span="6">
              <el-form-item label="粗碎(mm):" label-width="100px">
                <el-input-number
                  v-model="coarseCrushi"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata3()"
                  @blur="changedata3()"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="筛后重（g）:" label-width="100px">
                <el-input-number
                  v-model="weightAfter"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata4()"
                  @blur="changedata4()"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="损耗率(%):" label-width="110px">
                <el-input-number
                  v-model="lossRate"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata5()"
                  @blur="changedata5()"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="检测样(g):" label-width="100px">
                <el-input-number
                  v-model="testSample"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata6()"
                  @blur="changedata6()"
                />
              </el-form-item>
            </el-col>
          </el-row>

          <div style="display:flex;">
            <div style="width:50%">
              <el-row>
                <div class="install-title-1">一次缩分</div>
                <el-col :span="12">
                  <el-form-item label="留存副样(g):" label-width="100px">
                    <el-input-number
                      v-model="keepSubsample"
                      controls-position="right"
                      style="width: 100%;"
                      :min="1"
                      :step="1"
                      @focus="usernamedata7()"
                      @blur="changedata7()"
                    />
                  </el-form-item>
                </el-col>

                <el-col :span="11">
                  <el-form-item label="误差(%):" label-width="100px">
                    <el-input-number
                      v-model="crudeOneMistake"
                      controls-position="right"
                      style="width: 100%;"
                      :min="1"
                      :step="1"
                      @focus="usernamedata8()"
                      @blur="changedata8()"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
            </div>

            <div style="padding-left:20px;width:50%">
              <el-row>
                <div class="install-title-1">
                  二次缩分
                </div>
                <el-col :span="12">
                  <el-form-item label="待碎样(g):" label-width="90px">
                    <el-input-number
                      v-model="fragmentarySample"
                      controls-position="right"
                      style="width: 100%;"
                      :min="1"
                      :step="1"
                      @focus="usernamedata9()"
                      @blur="changedata9()"
                    />
                  </el-form-item>
                </el-col>

                <el-col :span="12">
                  <el-form-item label="误差(%):" label-width="90px">
                    <el-input-number
                      v-model="crudeTwoMistake"
                      controls-position="right"
                      style="width: 100%;"
                      :min="1"
                      :step="1"
                      @focus="usernamedata10()"
                      @blur="changedata10()"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </div>

          <el-row>
            <div class="install-title">中碎</div>
            <el-col :span="6">
              <el-form-item label="中碎(mm):" label-width="100px">
                <el-input-number
                  v-model="mesoclasm"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata11()"
                  @blur="changedata11()"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="筛后重(g):" label-width="100px">
                <el-input-number
                  v-model="mesoclasmWeightAfter"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata12()"
                  @blur="changedata12()"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="损耗率(%):" label-width="110px">
                <el-input-number
                  v-model="mesoclasmLossRate"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata13()"
                  @blur="changedata13()"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="检测样(g):" label-width="100px">
                <el-input-number
                  v-model="mesoclasmTestSample"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata14()"
                  @blur="changedata14()"
                />
              </el-form-item>
            </el-col>
          </el-row>

          <div style="display:flex;">
            <div style="width:50%">
              <el-row>
                <div class="install-title-1">一次缩分</div>
                <el-col :span="12">
                  <el-form-item label="留存副样(g):" label-width="100px">
                    <el-input-number
                      v-model="mesoclasmKeepSubsample"
                      controls-position="right"
                      style="width: 100%;"
                      :min="1"
                      :step="1"
                      @focus="usernamedata15()"
                      @blur="changedata15()"
                    />
                  </el-form-item>
                </el-col>

                <el-col :span="11">
                  <el-form-item label="误差(%):" label-width="100px">
                    <el-input-number
                      v-model="mesoclasmOneMistake"
                      controls-position="right"
                      style="width: 100%;"
                      :min="1"
                      :step="1"
                      @focus="usernamedata16()"
                      @blur="changedata16()"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
            </div>

            <div style="padding-left:20px;width:50%">
              <el-row>
                <div class="install-title-1">
                  二次缩分
                </div>
                <el-col :span="12">
                  <el-form-item label="待碎样(g):" label-width="90px">
                    <el-input-number
                      v-model="mesoclasmFragmentarySample"
                      controls-position="right"
                      style="width: 100%;"
                      :min="1"
                      :step="1"
                      @focus="usernamedata17()"
                      @blur="changedata17()"
                    />
                  </el-form-item>
                </el-col>

                <el-col :span="12">
                  <el-form-item label="误差(%):" label-width="90px">
                    <el-input-number
                      v-model="mesoclasmTwoMistake"
                      controls-position="right"
                      style="width: 100%;"
                      :min="1"
                      :step="1"
                      @focus="usernamedata18()"
                      @blur="changedata18()"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </div>

          <div style="display:flex;">
            <div style="width:50%">
              <el-row>
                <div class="install-title-1">三次缩分</div>
                <el-col :span="12">
                  <el-form-item label="待碎样(g):" label-width="100px">
                    <el-input-number
                      v-model="mesoclasmThreeFragmentarySample"
                      controls-position="right"
                      style="width: 100%;"
                      :min="1"
                      :step="1"
                      @focus="usernamedata19()"
                      @blur="changedata19()"
                    />
                  </el-form-item>
                </el-col>

                <el-col :span="11">
                  <el-form-item label="误差(%):" label-width="100px">
                    <el-input-number
                      v-model="mesoclasmThreeMistake"
                      controls-position="right"
                      style="width: 100%;"
                      :min="1"
                      :step="1"
                      @focus="usernamedata20()"
                      @blur="changedata20()"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </div>

          <el-row>
            <div class="install-title">细碎</div>
            <el-col :span="6">
              <el-form-item label="细碎(mm):" label-width="100px">
                <el-input-number
                  v-model="comminution"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata21()"
                  @blur="changedata21()"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="筛后重(g):" label-width="100px">
                <el-input-number
                  v-model="comminutionWeightAfter"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata22()"
                  @blur="changedata22()"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="损耗率(%):" label-width="110px">
                <el-input-number
                  v-model="comminutionLossRate"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata23()"
                  @blur="changedata23()"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="检测样(g):" label-width="100px">
                <el-input-number
                  v-model="comminutionTestSample"
                  controls-position="right"
                  style="width: 100%;"
                  :min="1"
                  :step="1"
                  @focus="usernamedata24()"
                  @blur="changedata24()"
                />
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>

        <el-card shadow="never">
          <div slot="header" class="clearfix">
            <div
              style="
                width: 3px;
                margin: auto 3px;
                height: 20px;
                background-color: steelblue;
              "
            />
            <span>修订信息</span>
          </div>

          <el-row>
            <el-col :span="6">
              <el-form-item prop="userName" label="修订人:" label-width="100px">
                <el-input
                  style="width: 100%;"
                  v-model="sampleDetailForm.userName"
                />
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item prop="date" label="修订日期:" label-width="100px">
                <el-date-picker
                  style="width: 100%;"
                  value-format="yyyy-MM-dd"
                  v-model="sampleDetailForm.date"
                  type="date"
                >
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item
                prop="checkUser"
                label="审核人:"
                label-width="110px"
              >
                <el-input
                  style="width: 100%;"
                  v-model="sampleDetailForm.checkUser"
                />
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item
                prop="checkDate"
                label="审核日期:"
                label-width="100px"
              >
                <el-date-picker
                  style="width: 100%;"
                  value-format="yyyy-MM-dd"
                  v-model="sampleDetailForm.checkDate"
                  type="date"
                >
                </el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="12">
              <el-form-item prop="reason" label="修订原因:" label-width="100px">
                <el-input
                  type="textarea"
                  style="width: 100%;"
                  :autosize="{ minRows: 2, maxRows: 4 }"
                  v-model="sampleDetailForm.reason"
                >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="佐证文件:" prop="file" label-width="110px">
                <el-upload
                  ref="waterImage"
                  class="upload-demo"
                  action="/api/modify/cyFileUpload"
                  :before-remove="beforeRemove"
                  :on-change="customUploadChangeImage2"
                  :before-upload="beforeUpload"
                  :on-exceed="handleExceedImage1"
                  accept=".PDF"
                  name="files"
                  multiple
                  :limit="1"
                  :file-list="fileList"
                >
                  <el-button size="small" type="primary" icon="el-icon-upload2"
                    >点击上传</el-button
                  >
                  <!-- <div slot="tip" class="el-upload__tip" style="color:red">
                    注：(仅限PDF格式文件上传，文件大小限制10M以内)
                  </div> -->
                  <el-button
                    type="primary"
                    size="small"
                    @click.stop="previewFile"
                    >&nbsp;预览文件</el-button
                  >
                </el-upload>
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="sampleVisible = false">取消</el-button>
        <el-button type="primary" @click="confirmCreate">提交</el-button>
      </div>
    </el-dialog>

    <!-- 修订弹框 -->
    <el-dialog
      :title="currentSample + '-修订确认'"
      :visible.sync="orderDialogVisible"
      center
    >
      <el-form ref="sampleDetailForm" :model="sampleDetailForm">
        <div style="display: flex;">
          <!--动态二级类别信息-->
          <div style="width: 50%;">
            <div class="install-title-1">修改前信息</div>
            <el-card
              v-for="item in sampledata"
              :key="item.groupName"
              style="margin-top: 5px; padding-bottom: 20px;"
            >
              <div
                v-if="item.groupName && item.groupName != ''"
                slot="header"
                class="clearfix"
              >
                <div
                  style="
                width: 3px;
                margin: auto 3px;
                height: 20px;
                background-color: steelblue;
              "
                />
                <span>{{ item.groupName }}</span>
              </div>
              <el-col
                v-for="(sitem, index) in item.params"
                :key="index"
                :span="8"
                style="height: 50px"
              >
                <el-form-item :label="sitem.name + ':'">
                  {{ sitem.value }}
                </el-form-item>
              </el-col>
            </el-card>
          </div>

          <div style="width: 30px;"></div>

          <div style="width: 50%;">
            <div class="install-title-1">修改后信息</div>
            <el-card
              v-for="item in sampleSecInfodata"
              :key="item.groupName"
              style="margin-top: 5px; padding-bottom: 20px;"
            >
              <div
                v-if="item.groupName && item.groupName != ''"
                slot="header"
                class="clearfix"
              >
                <div
                  style="
                width: 3px;
                margin: auto 3px;
                height: 20px;
                background-color: steelblue;
              "
                />
                <span>{{ item.groupName }}</span>
              </div>
              <el-col
                v-for="(sitem, index) in item.params"
                :key="index"
                :span="8"
                style="height: 50px"
              >
                <el-form-item :label="sitem.name + ':'">
                  {{ sitem.value }}
                </el-form-item>
              </el-col>
            </el-card>
          </div>
        </div>

        <el-card shadow="never" style="margin-top: 30px;">
          <div slot="header">
            <span>修订信息<i class="el-input__icon"/></span>
          </div>

          <el-row>
            <el-col :span="4">
              <el-form-item prop="userName" label="修订人:" label-width="110px">
                {{ this.sampleDetailForm.userName }}
              </el-form-item>
            </el-col>
            <el-col :span="5">
              <el-form-item prop="date" label="修订日期:" label-width="110px">
                {{ this.sampleDetailForm.date }}
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item
                prop="checkUser"
                label="审核人:"
                label-width="110px"
              >
                {{ this.sampleDetailForm.checkUser }}
              </el-form-item>
            </el-col>

            <el-col :span="5">
              <el-form-item
                prop="checkDate"
                label="审核日期:"
                label-width="110px"
              >
                {{ this.sampleDetailForm.checkDate }}
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item
                prop="checkUser"
                label="修订原因:"
                label-width="110px"
              >
                {{ this.sampleDetailForm.checkUser }}
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="佐证文件:" prop="file" label-width="110px">
                <el-upload
                  ref="waterImage"
                  class="upload-demo"
                  action="/api/modify/cyFileUpload"
                  :before-remove="beforeRemove"
                  :on-change="customUploadChangeImage2"
                  :before-upload="beforeUpload"
                  :on-exceed="handleExceedImage1"
                  accept=".PDF"
                  name="files"
                  multiple
                  :limit="1"
                  :file-list="fileList"
                >
                  <!-- <el-button size="small" type="primary" icon="el-icon-upload2"
                    >点击上传</el-button
                  > -->
                  <!-- <div slot="tip" class="el-upload__tip" style="color:red">
                    注：(仅限PDF格式文件上传，文件大小限制10M以内)
                  </div> -->
                  <el-button
                    type="primary"
                    size="small"
                    @click.stop="previewFile"
                    >&nbsp;预览文件</el-button
                  >
                </el-upload>
              </el-form-item>
            </el-col>
          </el-row>
        </el-card>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="orderDialogVisible = false">取消</el-button>
        <el-button type="primary" @click="confirmCreateVisible">确定</el-button>
      </div>
    </el-dialog>
    <!-- 现场照片预览 -->
    <el-dialog :visible.sync="dialogVisible" center top="5vh" width="40%">
      <el-form label-width="150px">
        <img :src="this.dialogImageUrl" alt="" style="width: 100%;" />
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import * as retesting from "@/api/retesting";
import Pagination from "@/components/Pagination"; // Secondary package based on el-pagination

export default {
  components: {
    Pagination
  },
  data() {
    return {
      searchForm: {
        pageNumber: 1,
        pageSize: 10
      },
      factorData: [],
      total: 0,
      selection: [],
      SelectionDrawUser: [],
      multiplese: [],
      sampleVisible: false,
      orderDialogVisible: false,
      dialogVisible: false,
      dialogImageUrl: "",

      currentSample: "",
      sampleImage: "",
      sampleImageList: [],
      multipleSelection: [],
      factorMultipleSelection: [],
      sampleDataInfo: [],
      sampleSecInfo: {},
      sampleSecInfodata: [],
      sampledata: [],
      sampleDetailFormdata: [],
      //数据
      sampleDetailForm: {
        id: "",
        sampItemPreVo: {
          laboratoryNo: "",
          fractureWeight: "",
          divisionKvalue: "",
          coarseCrushi: "",
          weightAfter: "",
          lossRate: "",
          testSample: "",
          keepSubsample: "",
          crudeOneMistake: "",
          fragmentarySample: "",
          crudeTwoMistake: "",
          mesoclasm: "",
          mesoclasmWeightAfter: "",
          mesoclasmLossRate: "",
          mesoclasmTestSample: "",
          mesoclasmKeepSubsample: "",
          mesoclasmOneMistake: "",
          mesoclasmFragmentarySample: "",
          mesoclasmTwoMistake: "",
          mesoclasmThreeFragmentarySample: "",
          mesoclasmThreeMistake: "",
          comminution: "",
          comminutionWeightAfter: "",
          comminutionLossRate: "",
          comminutionTestSample: ""
        },

        collectIamge1Id: null,
        collectIamge2Id: null,
        collectIamge3Id: null,
        collectIamge4Id: null,
        file: "",
        factorName: "",
        factorPoint: "",
        secdClassName: "",
        original: [],
        modify: [],
        sampleDataArray: [],
        sampleItemId: "",
        sampItemId: ""
      },
      collectLocation: "",

      params: [],
      modify: [],
      original: [],

      sampItemPreVo: {},

      laboratoryNo: "",
      sampleNo: "",

      fractureWeight: "",
      divisionKvalue: "",
      coarseCrushi: "",
      weightAfter: "",
      lossRate: "",
      testSample: "",
      keepSubsample: "",
      crudeOneMistake: "",
      fragmentarySample: "",
      crudeTwoMistake: "",
      mesoclasm: "",
      mesoclasmWeightAfter: "",
      mesoclasmLossRate: "",
      mesoclasmTestSample: "",
      mesoclasmKeepSubsample: "",
      mesoclasmOneMistake: "",
      mesoclasmFragmentarySample: "",
      mesoclasmTwoMistake: "",
      mesoclasmThreeFragmentarySample: "",
      mesoclasmThreeMistake: "",
      comminution: "",
      comminutionWeightAfter: "",
      comminutionLossRate: "",
      comminutionTestSample: "",

      sampleDeta: {
        sampItemPreVo: {},
        factorName: "",
        factorPoint: "",
        secdClassName: ""
      },
      fileList: [],
      fileLists: [],
      id: "",
      arrManufacturer: true,
      baseUrl: this.$store.getters.sysBaseUrl + "/cyImg/",
      img: [],
      value1: [],
      value2: [],
      value3: "",

      deviceArray: [],
      device2Array: [],
      onelevel: "",
      twolevel: "",
      threelevel: "",
      oneORtwoORthree: "",

      deviceArray2: [],
      device2Array2: [],
      onelevel2: "",
      twolevel2: "",
      threelevel2: "",
      oneORtwoORthree2: "",

      deviceArray3: [],
      device2Array3: [],
      onelevel3: "",
      twolevel3: "",
      threelevel3: "",
      oneORtwoORthree3: "",

      deviceArray4: [],
      device2Array4: [],
      onelevel4: "",
      twolevel4: "",
      threelevel4: "",
      oneORtwoORthree4: "",

      deviceArray5: [],
      device2Array5: [],
      onelevel5: "",
      twolevel5: "",
      threelevel5: "",
      oneORtwoORthree5: "",

      deviceArray6: [],
      device2Array6: [],
      onelevel6: "",
      twolevel6: "",
      threelevel6: "",
      oneORtwoORthree6: "",

      rules: {
        userName: [
          { required: true, message: "修订人不能为空", trigger: "blur" }
        ],
        checkUser: [
          { required: true, message: "审核人不能为空", trigger: "blur" }
        ]
      }
    };
  },
  created() {
    this.handleSearch();
  },
  methods: {
    handleSearch() {
      this.searchForm.id = this.$route.query.id;
      retesting.sampledList(this.searchForm).then(res => {
        if (res.code === 200) {
          this.factorData = res.result.records || [];
          this.total = res.result.total;
        }
      });
    },

    selectChange(row) {
      this.twolevel = "";
      this.threelevel = "";
      this.device2Array = [];
      this.onelevel = row.name;
      this.deviceArray = row.children;
    },
    selectChange2(row) {
      this.threelevel = "";
      this.twolevel = row.name;
      this.device2Array = row.children;
    },
    selectChange3(item, sitem, index) {
      this.usernameInput(item, sitem);
      this.oneORtwoORthree = this.onelevel + this.twolevel + this.threelevel;
      sitem.value = this.oneORtwoORthree;
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };

      arr1.groupName = item.groupName;
      arr1.groupKey = item.groupKey;

      arr2.name = sitem.name;
      arr2.value = this.oneORtwoORthree;
      arr2.key = sitem.key;

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupKey == arr1.groupKey;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupKey == arr1.groupKey;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    selectChangeTwo(row) {
      this.twolevel2 = "";
      this.threelevel2 = "";
      this.device2Array2 = [];
      this.onelevel2 = row.name;
      this.deviceArray2 = row.children;
    },
    selectChange2Two(row) {
      this.threelevel2 = "";
      this.twolevel2 = row.name;
      this.device2Array2 = row.children;
    },
    selectChange3Two(item, sitem, index) {
      this.usernameInput(item, sitem);
      this.oneORtwoORthree2 =
        this.onelevel2 + this.twolevel2 + this.threelevel2;
      sitem.value = this.oneORtwoORthree2;
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };

      arr1.groupName = item.groupName;
      arr1.groupKey = item.groupKey;

      arr2.name = sitem.name;
      arr2.value = this.oneORtwoORthree2;
      arr2.key = sitem.key;

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupKey == arr1.groupKey;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupKey == arr1.groupKey;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    selectChangeTwo3(row) {
      this.twolevel3 = "";
      this.threelevel3 = "";
      this.device2Array3 = [];
      this.onelevel3 = row.name;
      this.deviceArray3 = row.children;
    },
    selectChange2Two3(row) {
      this.threelevel3 = "";
      this.twolevel3 = row.name;
      this.device2Array3 = row.children;
    },
    selectChange3Two3(item, sitem, index) {
      this.usernameInput(item, sitem);
      this.oneORtwoORthree3 =
        this.onelevel3 + this.twolevel3 + this.threelevel3;
      sitem.value = this.oneORtwoORthree3;
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };

      arr1.groupName = item.groupName;
      arr1.groupKey = item.groupKey;

      arr2.name = sitem.name;
      arr2.value = this.oneORtwoORthree3;
      arr2.key = sitem.key;

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupKey == arr1.groupKey;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupKey == arr1.groupKey;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    selectChangeTwo4(row) {
      this.twolevel4 = "";
      this.threelevel4 = "";
      this.device2Array4 = [];
      this.onelevel4 = row.name;
      this.deviceArray4 = row.children;
    },
    selectChange2Two4(row) {
      this.threelevel4 = "";
      this.twolevel4 = row.name;
      this.device2Array4 = row.children;
    },
    selectChange3Two4(item, sitem, index) {
      this.usernameInput(item, sitem);
      this.oneORtwoORthree4 =
        this.onelevel4 + this.twolevel4 + this.threelevel4;
      sitem.value = this.oneORtwoORthree4;
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };

      arr1.groupName = item.groupName;
      arr1.groupKey = item.groupKey;

      arr2.name = sitem.name;
      arr2.value = this.oneORtwoORthree4;
      arr2.key = sitem.key;

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupKey == arr1.groupKey;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupKey == arr1.groupKey;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    selectChangeTwo5(row) {
      this.twolevel5 = "";
      this.threelevel5 = "";
      this.device2Array5 = [];
      this.onelevel5 = row.name;
      this.deviceArray5 = row.children;
    },
    selectChange2Two5(row) {
      this.threelevel5 = "";
      this.twolevel5 = row.name;
      this.device2Array5 = row.children;
    },
    selectChange3Two5(item, sitem, index) {
      this.usernameInput(item, sitem);
      this.oneORtwoORthree5 =
        this.onelevel5 + this.twolevel5 + this.threelevel5;
      sitem.value = this.oneORtwoORthree5;
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };

      arr1.groupName = item.groupName;
      arr1.groupKey = item.groupKey;

      arr2.name = sitem.name;
      arr2.value = this.oneORtwoORthree5;
      arr2.key = sitem.key;

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupKey == arr1.groupKey;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupKey == arr1.groupKey;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    selectChangeTwo6(row) {
      this.twolevel6 = "";
      this.threelevel6 = "";
      this.device2Array6 = [];
      this.onelevel6 = row.name;
      this.deviceArray6 = row.children;
    },
    selectChange2Two6(row) {
      this.threelevel6 = "";
      this.twolevel6 = row.name;
      this.device2Array6 = row.children;
    },
    selectChange3Two6(item, sitem, index) {
      this.usernameInput(item, sitem);
      this.oneORtwoORthree6 =
        this.onelevel6 + this.twolevel6 + this.threelevel6;
      sitem.value = this.oneORtwoORthree6;
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };

      arr1.groupName = item.groupName;
      arr1.groupKey = item.groupKey;

      arr2.name = sitem.name;
      arr2.value = this.oneORtwoORthree6;
      arr2.key = sitem.key;

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupKey == arr1.groupKey;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupKey == arr1.groupKey;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    //修订
    handleDetail(row) {
      // 获取数据
      this.currentSample = row.sampleNo;
      this.sampleImageList = [];
      this.sampleDataInfo = [];
      this.sampleSecInfo = [];
      this.sampleImage = "";
      this.fileLists = [];
      this.fileList = [];
      this.sampleSecInfodata = [];
      this.sampledata = [];
      var baseUrl = this.$store.getters.sysBaseUrl + "/cyImg/";

      retesting.sampleDetail(row.sampleNo).then(res => {
        if (res.code === 200 && res.result) {
          this.id = res.result.sampleDataVo.id;
          this.collectLocation = res.result.sampleDataVo.collectLocation;

          if (res.result.sampleDataVo.sampleData.groupKey === "1") {
            this.sampleSecInfo = res.result.sampleDataVo.sampleData;
          }

          this.sampleDetailForm = res.result || {};

          this.sampleDetailForm.sampleItemId = this.sampleDetailForm.sampItemId;

          let data = JSON.parse(
            JSON.stringify(res.result.sampleDataVo.sampleData)
          );
          this.sampleDetailFormdata = data;

          if (res.result.sampleDataVo.imageList[0] != undefined) {
            this.fileLists.push({
              url: baseUrl + res.result.sampleDataVo.imageList[0]
            });
          }
          if (res.result.sampleDataVo.imageList[1] != undefined) {
            this.fileLists.push({
              url: baseUrl + res.result.sampleDataVo.imageList[1]
            });
          }
          if (res.result.sampleDataVo.imageList[2] != undefined) {
            this.fileLists.push({
              url: baseUrl + res.result.sampleDataVo.imageList[2]
            });
          }
          if (res.result.sampleDataVo.imageList[3] != undefined) {
            this.fileLists.push({
              url: baseUrl + res.result.sampleDataVo.imageList[3]
            });
          }

          this.sampItemPreVo = res.result.sampItemPreVo || null;
          if (this.sampItemPreVo === null) {
            this.arrManufacturer = false;
          } else {
            this.arrManufacturer = true;
            this.sampleNo = this.sampItemPreVo.sampleNo;
            this.laboratoryNo = this.sampItemPreVo.laboratoryNo;
            this.fractureWeight = this.sampItemPreVo.fractureWeight;
            this.fragmentarySample = this.sampItemPreVo.fragmentarySample;
            this.divisionKvalue = this.sampItemPreVo.divisionKvalue;
            this.coarseCrushi = this.sampItemPreVo.coarseCrushi;
            this.weightAfter = this.sampItemPreVo.weightAfter;
            this.mesoclasmWeightAfter = this.sampItemPreVo.mesoclasmWeightAfter;
            this.lossRate = this.sampItemPreVo.lossRate;
            this.testSample = this.sampItemPreVo.testSample;
            this.keepSubsample = this.sampItemPreVo.keepSubsample;
            this.crudeOneMistake = this.sampItemPreVo.crudeOneMistake;
            this.mesoclasmKeepSubsample = this.sampItemPreVo.mesoclasmKeepSubsample;
            this.crudeTwoMistake = this.sampItemPreVo.crudeTwoMistake;
            this.mesoclasm = this.sampItemPreVo.mesoclasm;
            this.mesoclasmLossRate = this.sampItemPreVo.mesoclasmLossRate;
            this.mesoclasmTestSample = this.sampItemPreVo.mesoclasmTestSample;
            this.mesoclasmOneMistake = this.sampItemPreVo.mesoclasmOneMistake;
            this.mesoclasmFragmentarySample = this.sampItemPreVo.mesoclasmFragmentarySample;
            this.mesoclasmTwoMistake = this.sampItemPreVo.mesoclasmTwoMistake;
            this.mesoclasmThreeFragmentarySample = this.sampItemPreVo.mesoclasmThreeFragmentarySample;
            this.mesoclasmThreeMistake = this.sampItemPreVo.mesoclasmThreeMistake;
            this.comminution = this.sampItemPreVo.comminution;
            this.comminutionLossRate = this.sampItemPreVo.comminutionLossRate;
            this.comminutionTestSample = this.sampItemPreVo.comminutionTestSample;
            this.comminutionWeightAfter = this.sampItemPreVo.comminutionWeightAfter;
          }

          this.$nextTick(() => {
            // 提取图片
            // this.fileLists = res.result.sampleDataVo.imageList.map(i => {
            //   return baseUrl + i;
            // });
            // 二级类别
            this.sampleSecInfo = res.result.sampleDataVo.sampleData || [];
          });
          this.sampleVisible = true;
        }
      });
    },

    // 上传成功
    imgSuccess(res, files, fileList) {
      this.fileLists = fileList;
      let url = files.response.result;
      let urlStr = url.lastIndexOf("/");
      let fileName = url.substr(urlStr + 1);
      this.img.push(fileName);
      this.sampleDetailForm.collectIamge1Id = this.img[0];
      this.sampleDetailForm.collectIamge2Id = this.img[1];
      this.sampleDetailForm.collectIamge3Id = this.img[2];
      this.sampleDetailForm.collectIamge4Id = this.img[3];

      //这里我是用一个fileList数组存取，当保存的时候进行图片路径处理
      this.$message({
        type: "success",
        message: "上传成功!"
      });
    },
    // 上传失败
    imgError(res) {
      this.$message({
        type: "error",
        message: "附件上传失败"
      });
    },
    handleExceed(files, fileList) {
      this.$message.warning(
        `当前限制选择 4 张图片，以选 ${
          files.length
        } 张图片，共选择了 ${files.length + fileList.length} 张图片`
      );
    },
    // 附件上传图片预览事件，这个就是将路径直接放进一个弹窗显示出来就可以了

    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = true;
    },

    // 删除图片
    beforeRemoves(file, fileList) {
      return this.$confirm(`确定移除 ${file.name}？`);
    },

    // 上传按钮 限制图片大小和类型
    handleChangeUpload(file, fileList) {
      const isLt2M = file.size / 1024 / 1024 < 2;
      if (!isLt2M) {
        this.$message.error("上传图片大小不能超过 2MB!");
        return false;
      }
    },

    beforeUpload(e) {
      this.files = e;
    },

    customUploadChangeImage2(files) {
      if (files.status === "ready") return;
      if (files.status === "success") {
        const res = files.response || {};
        if (res && res.code === 200) {
          let url = files.response.result;
          // let urlStr = url.lastIndexOf("/");
          // let fileName = url.substr(urlStr + 1);
          this.sampleDetailForm.file = url;

          this.$message({
            type: "success",
            message: "上传成功!"
          });
        } else {
          this.$message.error("上传失败!");
          this.fileList = [];
        }
      } else {
        this.$message.error("上传失败!");
        this.fileList = [];
      }
    },

    // 删除文件
    beforeRemove(files, fileList) {
      return this.$confirm(`确定移除 ${files.name}？`);
    },

    handleExceedImage1(file, fileList) {
      this.$message.warning(`当前限制上传 1 个文件，以上传 ${file.length} 个`);
    },

    //预览文件
    previewFile() {
      if (
        this.sampleDetailForm.file != undefined &&
        this.sampleDetailForm.file != ""
      ) {
        var url =
          "https://www.huancelian.com/cyImg/" + this.sampleDetailForm.file;
        window.open(url);
      } else {
        this.$message.warning(`请上传文件`);
      }
    },

    onProvinceChange(e) {
      this.value1 = e.children;
    },

    onCityChange(e) {
      for (var obj in e.children) {
        this.value2.push(e.children[obj]["equipmentNumber"]);
      }
    },

    // 修改后
    changeMney(item, sitem, index) {
      this.usernameInput(item, sitem);
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };

      arr1.groupName = item.groupName;
      arr1.groupKey = item.groupKey;

      arr2.name = sitem.name;
      arr2.value = sitem.value;
      arr2.key = sitem.key;

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupKey == arr1.groupKey;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupKey == arr1.groupKey;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernameInput(item, sitem) {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: "",
        labelType: "",
        required: "",
        numericType: "",
        selectValue:"",
      };
      arr1.groupName = item.groupName;
      arr1.groupKey = item.groupKey;

      arr2.name = sitem.name;
      arr2.value = sitem.value;
      arr2.key = sitem.key;
      arr2.labelType = sitem.labelType;
      arr2.required = sitem.required;
      arr2.numericType = sitem.numericType;
      arr2.selectValue = sitem.selectValue;

      var result = this.sampleDetailFormdata.find(v => {
        return v.groupKey == arr1.groupKey;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 != undefined) {
          arr2.name = result2.name;
          arr2.value = result2.value;
          arr2.key = result2.key;
          arr2.labelType = result2.labelType;
          arr2.required = result2.required;
          arr2.numericType = result2.numericType;
          arr2.selectValue = result2.selectValue;
        }
      }

      if (this.sampledata.length == 0) {
        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupKey == arr1.groupKey;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupKey == arr1.groupKey;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedataA1() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "土壤/固废样品制备原始记录表";
      arr1.groupKey = "";

      arr2.name = "实验室编号";
      arr2.value = this.sampleDetailForm.sampItemPreVo.laboratoryNo;
      arr2.key = "";

      if (this.sampledata.length == 0) {
        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });

        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedataA1() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "土壤/固废样品制备原始记录表";
      arr1.groupKey = "";

      arr2.name = "实验室编号";
      arr2.value = this.laboratoryNo;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata1() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "土壤/固废样品制备原始记录表";
      arr1.groupKey = "";

      arr2.name = "待碎样重量(g)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.fractureWeight;
      arr2.key = "";

      if (this.sampledata.length == 0) {
        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });

        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata1() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "土壤/固废样品制备原始记录表";
      arr1.groupKey = "";

      arr2.name = "待碎样重量(g)";
      arr2.value = this.fractureWeight;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata2() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "土壤/固废样品制备原始记录表";
      arr1.groupKey = "";

      arr2.name = "缩分K值";
      arr2.value = this.sampleDetailForm.sampItemPreVo.divisionKvalue;
      arr2.key = "";

      if (this.sampledata.length == 0) {
        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });

        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata2() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "土壤/固废样品制备原始记录表";
      arr1.groupKey = "";

      arr2.name = "缩分K值";
      arr2.value = this.divisionKvalue;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata3() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "粗碎";
      arr1.groupKey = "";

      arr2.name = "粗碎(mm)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.coarseCrushi;
      arr2.key = "";

      if (this.sampledata.length == 0) {
        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });

        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata3() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "粗碎";
      arr1.groupKey = "";

      arr2.name = "粗碎(mm)";
      arr2.value = this.coarseCrushi;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata4() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "粗碎";
      arr1.groupKey = "";

      arr2.name = "筛后重（g）";
      arr2.value = this.sampleDetailForm.sampItemPreVo.weightAfter;
      arr2.key = "";

      if (this.sampledata.length == 0) {
        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });

        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata4() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "粗碎";
      arr1.groupKey = "";

      arr2.name = "筛后重（g）";
      arr2.value = this.weightAfter;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata5() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "粗碎";
      arr1.groupKey = "";

      arr2.name = "损耗率(%)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.lossRate;
      arr2.key = "";

      if (this.sampledata.length == 0) {
        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });

        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata5() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "粗碎";
      arr1.groupKey = "";

      arr2.name = "损耗率(%)";
      arr2.value = this.lossRate;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {
        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata6() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "粗碎";
      arr1.groupKey = "";

      arr2.name = "检测样(g)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.testSample;
      arr2.key = "";

      if (this.sampledata.length == 0) {
        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata6() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "粗碎";
      arr1.groupKey = "";

      arr2.name = "检测样(g)";
      arr2.value = this.testSample;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata7() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(粗碎)一次缩分";
      arr1.groupKey = "";
      arr2.name = "留存副样(g)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.keepSubsample;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata7() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(粗碎)一次缩分";
      arr1.groupKey = "";

      arr2.name = "留存副样(g)";
      arr2.value = this.keepSubsample;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata8() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(粗碎)一次缩分";
      arr1.groupKey = "";

      arr2.name = "误差(%)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.crudeOneMistake;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata8() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(粗碎)一次缩分";
      arr1.groupKey = "";

      arr2.name = "误差(%)";
      arr2.value = this.crudeOneMistake;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata9() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(粗碎)二次缩分";
      arr1.groupKey = "";

      arr2.name = "待碎样(g)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.fragmentarySample;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata9() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(粗碎)二次缩分";
      arr1.groupKey = "";

      arr2.name = "待碎样(g)";
      arr2.value = this.fragmentarySample;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata10() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(粗碎)二次缩分";
      arr1.groupKey = "";

      arr2.name = "误差(%)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.crudeTwoMistake;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata10() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(粗碎)二次缩分";
      arr1.groupKey = "";

      arr2.name = "误差(%)";
      arr2.value = this.crudeTwoMistake;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata11() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "中碎";
      arr1.groupKey = "";

      arr2.name = "中碎(mm)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.mesoclasm;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata11() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "中碎";
      arr1.groupKey = "";

      arr2.name = "中碎(mm)";
      arr2.value = this.mesoclasm;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata12() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "中碎";
      arr1.groupKey = "";

      arr2.name = "筛后重(g)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.mesoclasmWeightAfter;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata12() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "中碎";
      arr1.groupKey = "";

      arr2.name = "筛后重(g)";
      arr2.value = this.mesoclasmWeightAfter;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata13() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "中碎";
      arr1.groupKey = "";

      arr2.name = "损耗率(%)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.mesoclasmLossRate;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata13() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "中碎";
      arr1.groupKey = "";

      arr2.name = "损耗率(%)";
      arr2.value = this.mesoclasmLossRate;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata14() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "中碎";
      arr1.groupKey = "";

      arr2.name = "检测样(g)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.mesoclasmTestSample;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata14() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "中碎";
      arr1.groupKey = "";

      arr2.name = "检测样(g)";
      arr2.value = this.mesoclasmTestSample;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata15() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)一次缩分";
      arr1.groupKey = "";

      arr2.name = "留存副样(g)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.mesoclasmKeepSubsample;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata15() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)一次缩分";
      arr1.groupKey = "";

      arr2.name = "留存副样(g)";
      arr2.value = this.mesoclasmKeepSubsample;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata16() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)一次缩分";
      arr1.groupKey = "";

      arr2.name = "误差(%)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.mesoclasmOneMistake;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata16() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)一次缩分";
      arr1.groupKey = "";

      arr2.name = "误差(%)";
      arr2.value = this.mesoclasmOneMistake;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata17() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)二次缩分";
      arr1.groupKey = "";

      arr2.name = "待碎样(g)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.mesoclasmFragmentarySample;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata17() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)二次缩分";
      arr1.groupKey = "";

      arr2.name = "待碎样(g)";
      arr2.value = this.mesoclasmFragmentarySample;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata18() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)二次缩分";
      arr1.groupKey = "";

      arr2.name = "误差(%)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.mesoclasmTwoMistake;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata18() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)二次缩分";
      arr1.groupKey = "";

      arr2.name = "误差(%)";
      arr2.value = this.mesoclasmTwoMistake;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata19() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)三次缩分";
      arr1.groupKey = "";

      arr2.name = "待碎样(g)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.mesoclasmThreeFragmentarySample;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata19() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)三次缩分";
      arr1.groupKey = "";

      arr2.name = "待碎样(g)";
      arr2.value = this.mesoclasmThreeFragmentarySample;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata20() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)三次缩分";
      arr1.groupKey = "";

      arr2.name = "误差(%)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.mesoclasmThreeMistake;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata20() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "(中碎)三次缩分";
      arr1.groupKey = "";

      arr2.name = "误差(%)";
      arr2.value = this.mesoclasmThreeMistake;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata21() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "细碎";
      arr1.groupKey = "";

      arr2.name = "细碎(mm)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.comminution;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata21() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "细碎";
      arr1.groupKey = "";

      arr2.name = "细碎(mm)";
      arr2.value = this.comminution;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata22() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "细碎";
      arr1.groupKey = "";

      arr2.name = "筛后重(g)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.comminutionWeightAfter;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata22() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "细碎";
      arr1.groupKey = "";

      arr2.name = "筛后重(g)";
      arr2.value = this.comminutionWeightAfter;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata23() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "细碎";
      arr1.groupKey = "";

      arr2.name = "损耗率(%)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.comminutionLossRate;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata23() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "细碎";
      arr1.groupKey = "";

      arr2.name = "损耗率(%)";
      arr2.value = this.comminutionLossRate;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改前
    usernamedata24() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "细碎";
      arr1.groupKey = "";

      arr2.name = "检测样(g)";
      arr2.value = this.sampleDetailForm.sampItemPreVo.comminutionTestSample;
      arr2.key = "";

      if (this.sampledata.length == 0) {

        this.sampledata.push(arr1);
      }

      var result = this.sampledata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampledata.push(arr1);
        var result = this.sampledata.find(v => {
          return v.groupName == arr1.groupName;
        });


        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    // 修改后
    changedata24() {
      var arr1 = {
        groupName: "",
        groupKey: "",
        params: []
      };
      var arr2 = {
        name: "",
        value: "",
        key: ""
      };
      arr1.groupName = "细碎";
      arr1.groupKey = "";

      arr2.name = "检测样(g)";
      arr2.value = this.comminutionTestSample;
      arr2.key = "";

      if (this.sampleSecInfodata.length == 0) {

        this.sampleSecInfodata.push(arr1);
      }

      var result = this.sampleSecInfodata.find(v => {
        return v.groupName == arr1.groupName;
      });
      if (result != undefined) {
        var result2 = result.params.find(v => {
          return v.name == arr2.name;
        });
        if (result2 == undefined) {
          result.params.push(arr2);
        }
      } else {
        this.sampleSecInfodata.push(arr1);
        var result = this.sampleSecInfodata.find(v => {
          return v.groupName == arr1.groupName;
        });
        if (result != undefined) {
          var result2 = result.params.find(v => {
            return v.name == arr2.name;
          });
          if (result2 == undefined) {
            result.params.push(arr2);
          }
        }
      }
    },

    confirmCreate() {
      this.sampleDetailForm.id = this.id;
      if (this.sampleDetailForm.sampItemPreVo != null) {
        this.sampleDetailForm.sampItemPreVo.laboratoryNo = this.laboratoryNo;
        this.sampleDetailForm.sampItemPreVo.fractureWeight = this.fractureWeight;
        this.sampleDetailForm.sampItemPreVo.fragmentarySample = this.fragmentarySample;
        this.sampleDetailForm.sampItemPreVo.divisionKvalue = this.divisionKvalue;
        this.sampleDetailForm.sampItemPreVo.coarseCrushi = this.coarseCrushi;
        this.sampleDetailForm.sampItemPreVo.weightAfter = this.weightAfter;
        this.sampleDetailForm.sampItemPreVo.mesoclasmWeightAfter = this.mesoclasmWeightAfter;
        this.sampleDetailForm.sampItemPreVo.lossRate = this.lossRate;
        this.sampleDetailForm.sampItemPreVo.testSample = this.testSample;
        this.sampleDetailForm.sampItemPreVo.keepSubsample = this.keepSubsample;
        this.sampleDetailForm.sampItemPreVo.crudeOneMistake = this.crudeOneMistake;
        this.sampleDetailForm.sampItemPreVo.mesoclasmKeepSubsample = this.mesoclasmKeepSubsample;
        this.sampleDetailForm.sampItemPreVo.crudeTwoMistake = this.crudeTwoMistake;
        this.sampleDetailForm.sampItemPreVo.mesoclasm = this.mesoclasm;
        this.sampleDetailForm.sampItemPreVo.mesoclasmLossRate = this.mesoclasmLossRate;
        this.sampleDetailForm.sampItemPreVo.mesoclasmTestSample = this.mesoclasmTestSample;
        this.sampleDetailForm.sampItemPreVo.mesoclasmOneMistake = this.mesoclasmOneMistake;
        this.sampleDetailForm.sampItemPreVo.mesoclasmFragmentarySample = this.mesoclasmFragmentarySample;
        this.sampleDetailForm.sampItemPreVo.mesoclasmTwoMistake = this.mesoclasmTwoMistake;
        this.sampleDetailForm.sampItemPreVo.mesoclasmThreeFragmentarySample = this.mesoclasmThreeFragmentarySample;
        this.sampleDetailForm.sampItemPreVo.mesoclasmThreeMistake = this.mesoclasmThreeMistake;
        this.sampleDetailForm.sampItemPreVo.comminution = this.comminution;
        this.sampleDetailForm.sampItemPreVo.comminutionLossRate = this.comminutionLossRate;
        this.sampleDetailForm.sampItemPreVo.comminutionTestSample = this.comminutionTestSample;
        this.sampleDetailForm.sampItemPreVo.comminutionWeightAfter = this.comminutionWeightAfter;
      }

      this.sampleDetailForm.sampleDataArray = this.sampleDetailForm.sampleDataVo.sampleData;



      this.orderDialogVisible = true;
    },
    confirmCreateVisible() {
      this.sampleDetailForm.original = this.sampledata;
      this.sampleDetailForm.modify = this.sampleSecInfodata;

      retesting.revise(this.sampleDetailForm).then(res => {
        if (res.code === 200) {

          this.$notify({
            title: "成功",
            message: res.message,
            type: "success"
          });
          this.handleSearch();
          this.sampleVisible = false;
          this.orderDialogVisible = false;
        } else {
          this.$notify({
            title: "失败",
            message: res.message,
            type: "error"
          });
          this.handleSearch();
          this.sampleVisible = false;
          this.orderDialogVisible = false;
        }
      });
    }
  }
};
</script>
<style lang="scss" scoped>
::v-deep .el-upload--picture-card {
  background-color: #fbfdff;
  border: 0px dashed #c0ccda;
  border-radius: 12px;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  cursor: pointer;
  line-height: 40px;
  vertical-align: top;
}
::v-deep .el-upload-list {
  display: flex;
  margin: 0px;
  width: 140%;
  li {
    width: 120px;
    height: 80px;
    margin: 0;
  }
}
.search_div {
  > div {
    &:nth-child(1) {
      margin-right: 10px;
    }
    display: inline-block;
  }
}

.search_input {
  width: 200px;
  margin-bottom: 5px;
}
.search-right {
  text-align: right;
  padding-right: 25px;
}
.item {
  font-size: 16px;
}
::v-deep .el-card .el-card__header {
  padding: 5px 20px;
  background: #f3f2f2;
}
.block-flex {
  position: relative;
  display: flex;
  & > div {
    border: 1px solid #b7b7b7;
    width: 100px;
    margin: 0;
    line-height: 30px;
    text-align: center;
  }
  & > div:first-child {
    background: #b7b7b7;
  }
}
.card-left {
  width: 100%;
  min-height: 200px;
  max-height: 450px;
}
.card-right {
  width: 100%;
  min-height: 200px;
  max-height: 450px;
}
.el-card {
  overflow: auto;
}
.el-dropdown-link {
  cursor: pointer;
  color: #409eff;
}
.el-icon-arrow-down {
  font-size: 14px;
}
// /deep/.main-body .el-table__header-wrapper  .el-checkbox{
//   display:none
// }
.agreement_picture {
  min-height: calc(100%);
  .pdf {
    height: calc(100%);
  }
}

/deep/ .el-input.is-disabled .el-input__inner {
  color: unset;
}

/deep/.i-input .el-input__inner {
  text-align: center;
}
/deep/.right-input .el-input__inner {
  text-align: right;
}

.el-header {
  line-height: 45px;
  height: 45px;
}
.el-footer {
  text-align: right;
  line-height: 45px;
  height: 45px;

  .pagination-container {
    padding: 0;
    margin-top: 10px;
    margin-bottom: 45px;
  }
}
.el-main {
  overflow-y: auto;
}
.el-container {
  max-height: 450px;
}

.text {
  font-size: 14px;
}
.dialog-item {
  padding-left: 3px;
  line-height: 30px;
  cursor: pointer;
}
.dialog-item:hover {
  background: #e8f4ff;
  border-radius: 3px;
}

table {
  background-color: transparent;
}

caption {
  padding-top: 8px;
  padding-bottom: 8px;
  color: #777;
  text-align: left;
}

th {
  text-align: left;
}

.table {
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
}

.table > tbody > tr > td,
.table > tbody > tr > th,
.table > tfoot > tr > td,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > thead > tr > th {
  padding: 8px;
  line-height: 1.42857143;
  vertical-align: middle;
  border-top: 1px solid #ddd;
}

.table > thead > tr > th {
  vertical-align: bottom;
  border-bottom: 2px solid #ddd;
}

.table > caption + thead > tr:first-child > td,
.table > caption + thead > tr:first-child > th,
.table > colgroup + thead > tr:first-child > td,
.table > colgroup + thead > tr:first-child > th,
.table > thead:first-child > tr:first-child > td,
.table > thead:first-child > tr:first-child > th {
  border-left: 1px solid #f1f2f4;
}

.table > tbody + tbody {
  border-top: 2px solid #ddd;
}

.table .table {
  background-color: #ffffff;
}

.table-condensed > tbody > tr > td,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > td,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > thead > tr > th {
  padding: 5px;
}

.table-bordered {
  border: 1px solid #ddd;
}

.table-bordered > tbody > tr > td,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > td,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > thead > tr > th {
  border: 1px solid #ddd;
}

.table-bordered > thead > tr > td,
.table-bordered > thead > tr > th {
  border-bottom-width: 2px;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f9f9f9;
}

.table-hover > tbody > tr:hover {
  background-color: #f5f5f5;
}

table col[class*="col-"] {
  position: static;
  display: table-column;
  float: none;
}

table td[class*="col-"],
table th[class*="col-"] {
  position: static;
  display: table-cell;
  float: none;
}

.table > tbody > tr.active > td,
.table > tbody > tr.active > th,
.table > tbody > tr > td.active,
.table > tbody > tr > th.active,
.table > tfoot > tr.active > td,
.table > tfoot > tr.active > th,
.table > tfoot > tr > td.active,
.table > tfoot > tr > th.active,
.table > thead > tr.active > td,
.table > thead > tr.active > th,
.table > thead > tr > td.active,
.table > thead > tr > th.active {
  background-color: #f5f5f5;
}

.table-hover > tbody > tr.active:hover > td,
.table-hover > tbody > tr.active:hover > th,
.table-hover > tbody > tr:hover > .active,
.table-hover > tbody > tr > td.active:hover,
.table-hover > tbody > tr > th.active:hover {
  background-color: #e8e8e8;
}

.table > tbody > tr.success > td,
.table > tbody > tr.success > th,
.table > tbody > tr > td.success,
.table > tbody > tr > th.success,
.table > tfoot > tr.success > td,
.table > tfoot > tr.success > th,
.table > tfoot > tr > td.success,
.table > tfoot > tr > th.success,
.table > thead > tr.success > td,
.table > thead > tr.success > th,
.table > thead > tr > td.success,
.table > thead > tr > th.success {
  background-color: #dff0d8;
}

.table-hover > tbody > tr.success:hover > td,
.table-hover > tbody > tr.success:hover > th,
.table-hover > tbody > tr:hover > .success,
.table-hover > tbody > tr > td.success:hover,
.table-hover > tbody > tr > th.success:hover {
  background-color: #d0e9c6;
}

.table > tbody > tr.info > td,
.table > tbody > tr.info > th,
.table > tbody > tr > td.info,
.table > tbody > tr > th.info,
.table > tfoot > tr.info > td,
.table > tfoot > tr.info > th,
.table > tfoot > tr > td.info,
.table > tfoot > tr > th.info,
.table > thead > tr.info > td,
.table > thead > tr.info > th,
.table > thead > tr > td.info,
.table > thead > tr > th.info {
  background-color: #d9edf7;
}

.table-hover > tbody > tr.info:hover > td,
.table-hover > tbody > tr.info:hover > th,
.table-hover > tbody > tr:hover > .info,
.table-hover > tbody > tr > td.info:hover,
.table-hover > tbody > tr > th.info:hover {
  background-color: #c4e3f3;
}

.table > tbody > tr.warning > td,
.table > tbody > tr.warning > th,
.table > tbody > tr > td.warning,
.table > tbody > tr > th.warning,
.table > tfoot > tr.warning > td,
.table > tfoot > tr.warning > th,
.table > tfoot > tr > td.warning,
.table > tfoot > tr > th.warning,
.table > thead > tr.warning > td,
.table > thead > tr.warning > th,
.table > thead > tr > td.warning,
.table > thead > tr > th.warning {
  background-color: #fcf8e3;
}

.table-hover > tbody > tr.warning:hover > td,
.table-hover > tbody > tr.warning:hover > th,
.table-hover > tbody > tr:hover > .warning,
.table-hover > tbody > tr > td.warning:hover,
.table-hover > tbody > tr > th.warning:hover {
  background-color: #faf2cc;
}

.table > tbody > tr.danger > td,
.table > tbody > tr.danger > th,
.table > tbody > tr > td.danger,
.table > tbody > tr > th.danger,
.table > tfoot > tr.danger > td,
.table > tfoot > tr.danger > th,
.table > tfoot > tr > td.danger,
.table > tfoot > tr > th.danger,
.table > thead > tr.danger > td,
.table > thead > tr.danger > th,
.table > thead > tr > td.danger,
.table > thead > tr > th.danger {
  background-color: #f2dede;
}

.table-hover > tbody > tr.danger:hover > td,
.table-hover > tbody > tr.danger:hover > th,
.table-hover > tbody > tr:hover > .danger,
.table-hover > tbody > tr > td.danger:hover,
.table-hover > tbody > tr > th.danger:hover {
  background-color: #ebcccc;
}

.table-responsive {
  min-height: 3.01%;
  overflow-x: auto;
}

.table-bordered,
.table-bordered > tbody > tr > td,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > td,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > thead > tr > th {
  border: 1px solid #e9ecef;
  text-align: center;
  line-height: 14px;
}

.table-bordered,
td,
th {
  border-radius: 0 !important;
}

.table-bordered > tbody > tr:last-child > td {
  border-bottom: 1px solid #e9ecef;
}

.bootstrap-table .fixed-table-container .fixed-table-header {
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
}

.fixed-table-header .table > thead > tr {
  background: none !important;
}

.table > thead > tr {
  color: #636363;
  font-weight: 400;
  background: rgba(0, 0, 0, 0.05);
  /*   background: repeat-x #fafafa;
  background-image: -webkit-linear-gradient(top,#F8F8F8 0,#fafafa 100%);
  background-image: -o-linear-gradient(top,#F8F8F8 0,#fafafa 100%);
  background-image: linear-gradient(to bottom,#F8F8F8 0,#fafafa 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff8f8f8', endColorstr='#ffececec', GradientType=0); */
}

.table > thead > tr > th {
  border-color: #e9ecef;
  font-weight: 700;
  border-right-color: transparent;
}

.table > thead > tr > th .ace-icon:first-child {
  margin-right: 2px;
}

.table > thead > tr > th:first-child {
  border-left-color: #f1f1f1;
}

.table > thead > tr > th:last-child {
  border-right-color: #f1f1f1;
}

.table.table-bordered > thead > tr > th {
  vertical-align: middle;
}

td.center,
th.center {
  text-align: center;
}

td .lbl,
th .lbl {
  margin-bottom: 0;
}

td .lbl:only-child,
th .lbl:only-child {
  vertical-align: top;
}

.table-header {
  background-color: #307ecc;
  color: #fff;
  font-size: 14px;
  line-height: 38px;
  padding-left: 12px;
  margin-bottom: 1px;
}

.table-header .close {
  margin-right: 8px;
  margin-top: 0;
  opacity: 0.45;
  filter: alpha(opacity=45);
}

.table-header .close:hover {
  opacity: 0.75;
  filter: alpha(opacity=75);
}

th.detail-col {
  width: 48px;
  text-align: center;
}

tr.detail-row {
  display: none;
}

tr.detail-row.open {
  display: block;
  display: table-row;
}

tr.detail-row > td {
  background-color: #f1f6f8;
  border-top: 3px solid #d1e1ea !important;
}

.table-detail {
  background-color: #fff;
  border: 1px solid #dcebf7;
  width: 100%;
  padding: 12px;
}

.table-detail td > .profile-user-info {
  width: 100%;
}
.clearfix {
  line-height: 40px;
  display: flex;
}
.el-dropdown-link {
  cursor: pointer;
  color: #409eff;
}
.el-icon-arrow-down {
  font-size: 12px;
}
.install-title {
  display: flex;
  align-items: center;
  line-height: 30px;
  padding-left: 20px;
  color: #0a0a0a;
  background-color: #e1e1e3;
  justify-content: flex-start;
  margin-bottom: 10px;
}
.install-title-1 {
  display: flex;
  align-items: center;
  line-height: 30px;
  padding-left: 20px;
  color: #0a0a0a;
  background-color: #e2f0ff;
  justify-content: flex-start;
  margin-bottom: 10px;
}
.delete {
  width: 10px;
  height: 10px;
  position: relative;
  top: -10px;
  cursor: pointer;
}
::v-deep.el-upload-list__item {
  margin: 10px 10px;
}
::v-deep.el-upload-list--picture .el-upload-list__item {
  margin: 10px 10px !important;
}
.user-info-head {
  position: relative;
  display: inline-block;
  height: 120px;
}

::v-deep.avatar-upload-preview {
  width: 400px;
  border-radius: 0%;
  height: 400px;
  > img {
    transform: translateX(0);
  }
}
.user-info-head:hover:after {
  content: "+";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  color: #eee;
  background: rgba(0, 0, 0, 0.5);
  font-size: 24px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: pointer;
  line-height: 110px;
  border-radius: 50%;
}

/deep/.upload-dragger {
  background-color: #fff;
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.cropper-wrapper {
  //height: calc(100vh - 50px);
  .pre-box {
    button {
      width: 100px;
      margin-top: 15px;
    }
  }
}

/deep/.el-dialog {
  position: relative;
  margin: 0 auto 50px;
  background: #fff;
  border-radius: 2px;
  box-sizing: border-box;
  width: 80%;
}

.crop-dialog {
  .cropper-content {
    padding: 0 40px;

    .cropper {
      width: 900px;
      height: 900px;
    }
  }

  .action-box {
    padding: 25px 40px 0 40px;
    display: flex;
    justify-content: center;

    button {
      width: 80px;
      margin-right: 15px;
    }
  }

  .dialog-footer {
    button {
      width: 100px;
    }
  }
}
</style>
